﻿@model IEnumerable<SportStore.Models.Entities.Product>
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<h2>
    Index</h2>
<table class="Grid">
    <tr>
        <th>
        ID
        </th>
        <th>
            Name
        </th>
        <th class="NumericCol">
            Price
        </th>
        <th>Actions</th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
        <td>@item.ProductID</td>
            <td>
                @Html.ActionLink(item.Name, "Edit", new { id = item.ProductID })
                
            </td>
            <td class="NumericCol">
                @item.Price.ToString("c")
            </td>
            <td>
                @Html.ActionLink("Delete", "Delete", new { id = item.ProductID })
            </td>
        </tr>
    }
</table>
<p>
    @Html.ActionLink("Add a new product", "Create")
</p>
